package design.future;


import java.util.concurrent.Callable;

public class JdkFuture implements Callable<String> {
    private String para;

    public JdkFuture(String para) {
        this.para = para;
    }

    @Override
    public String call() throws Exception {
        /**
         * 这里是真实的业务逻辑，其执行可能很慢
         */
        Thread.sleep(2000);
        String result = this.para + "处理完成";
        System.out.println("result = " + result);
        return result;
    }


}
